Weave Loader
0.2.4
jvm
Weave Loader
/
net.weavemc.loader.api.event
/
EventBus
Event
Bus
open
class
EventBus
(
source
)
The event bus handles events and event listeners.
See also
Event
Subscribe
Event
Members
Constructors
Event
Bus
Link copied to clipboard
constructor
(
)
Functions
call
Event
Link copied to clipboard
open
fun
<
T
:
Event
?
>
callEvent
(
event
:
T
)
Call an event for all the listeners listening for it.
subscribe
Link copied to clipboard
open
fun
subscribe
(
obj
:
Any
)
Subscribe an object to the event bus, turning methods defined in it into listeners using @SubscribeEvent.
open
fun
<
T
:
Event
?
>
subscribe
(
event
:
Class
<
T
>
,
handler
:
Consumer
<
T
>
)
Subscribe a listener to the event bus.
unsubscribe
Link copied to clipboard
open
fun
unsubscribe
(
obj
:
Any
)
Unsubscribe an object from the event bus, which unsubscribes all of its listeners.
open
fun
unsubscribe
(
consumer
:
Consumer
<
out
Event
>
)
Unsubscribe a listener from the event bus.